package command.remoteController;

import command.remoteController.command.airConditoner.AirConditionerOffCommand;
import command.remoteController.command.airConditoner.AirConditionerOnCommand;
import command.remoteController.command.light.LightOffCommand;
import command.remoteController.command.light.LightOnCommand;
import command.remoteController.invoker.Invoker;
import command.remoteController.receiver.AirConditionerReceiver;
import command.remoteController.receiver.LightReceiver;
import command.remoteController.receiver.base.Receiver;

public class Client {

    public static void main(String[] args) {

        Invoker invoker = new Invoker();

        Receiver conditionerReceiver = new AirConditionerReceiver();
        invoker.addApp(new AirConditionerOnCommand(conditionerReceiver), new AirConditionerOffCommand(conditionerReceiver));

        LightReceiver lightReceiver = new LightReceiver();
        invoker.addApp(new LightOnCommand(lightReceiver), new LightOffCommand(lightReceiver));

        invoker.turnOnAll();

        invoker.turnOnUndo(0);

    }

}
